package com.pig4cloud.pigx.common.customize.api.config;

import com.pig4cloud.pigx.common.customize.api.annotation.ApiVersion;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * 注入 {@link ApiVersion} 映射处理器
 *
 * @since 2022/10/27 10:28
 */
@Component
public class ApiVersionHandlerMappingConfig implements WebMvcRegistrations {
	/**
	 * 注入 {@link ApiVersion} 映射处理器
	 *
	 * @return {@link RequestMappingHandlerMapping}
	 * @since 2022/10/27 11:43
	 */
	@Override
	public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
		return new ApiVersionHandlerMapping();
	}
}
